import { defineConfig } from "rollup";
import esbuild from 'rollup-plugin-esbuild';
import copy from 'rollup-plugin-copy';
import json from '@rollup/plugin-json';

export default defineConfig([
    {
        input: 'src/index.ts',
        output: {
            format: 'cjs',
            file: 'dist/index.js'
        },
        plugins: [
            json(),
            esbuild({
                minify: false
            }),
            copy({
                targets: [
                    { src: 'src/**/*.json', dest: 'dist' },
                    { src: 'src/**/*.graphql', dest: 'dist' }
                ],
                verbose: true
            })
        ]
    }
]);